package com.lvyq.myplayer.ui.activity

import android.view.View
import android.widget.ImageView
import androidx.core.view.ViewCompat
import androidx.core.view.ViewPropertyAnimatorListener
import com.lvyq.myplayer.R
import com.lvyq.myplayer.base.BaseActivity

class SplashActivity:BaseActivity(), ViewPropertyAnimatorListener {
    override fun getLayoutId(): Int {
        return R.layout.activity_splash
    }

    override fun initData() {
         var splashImg = findViewById<ImageView>(R.id.splashImg)
        ViewCompat.animate(splashImg).scaleX(1.0f).scaleY(1.0f).setListener(this).setDuration(1000)
    }

    override fun onAnimationStart(view: View) {
    }

    override fun onAnimationEnd(view: View) {
        startActivityAndFinish<MainActivity>()
    }

    override fun onAnimationCancel(view: View) {
    }
}